package com.tbit.uqbike.service.business.impl;


import com.tbit.uqbike.object.pojo.VerticalParkLog;
import com.tbit.uqbike.service.business.VerticalParkLogService;
import com.tbit.uqbike.webmanager.dao.log.VerticalParkLogDao;
import com.tbit.uqbike.webmanager.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author LMY
 * @create 2023-07-11 14:53
 */
@Service
public class VerticalParkLogServiceImpl implements VerticalParkLogService {

    @Autowired
    private VerticalParkLogDao verticalParkLogDao;

    @Override
    public List<VerticalParkLog> getMachineAccountId(Integer accountId) {
        Map<String, Object> map = new HashMap<>();
        map.put("accountId", accountId);
        map.put("result", 0);
        map.put("enable", 1);
        return verticalParkLogDao.getMachineAccountId(map);
    }

    public List<VerticalParkLog> getMachineRegionIds(String regionIds) {
        Map<String, Object> map = new HashMap<>();
        map.put("regionId", regionIds);
        map.put("result", 0);
        map.put("enable", 1);
        return verticalParkLogDao.getMachineAccountId(map);
    }

    public List<VerticalParkLog> getMachineRegionId(List<Integer> regionId) {
        Map<String, Object> map = new HashMap<>();
        map.put("regionId", StringUtil.getListString(regionId));
        map.put("result", 0);
        map.put("enable", 1);
        return verticalParkLogDao.getMachineAccountId(map);
    }
}
